﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace chihuopig.IService
{
    public interface IBaseService<T> where T : class
    {
        /// <summary>
        /// 增加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<long> Insertable(T Model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<int> Deleteable(long Id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="Model"></param>
        Task<int> Updateable(T Model);

        Task<double> GetPageTotal(int PageSize);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<int> delAll(long[] Id);

        /// <summary>
        /// 查询修改的对象
        /// </summary>
        /// <param name="Id">表的Id</param>
        /// <returns></returns>
        Task<T> EditAsync(long Id);

      
    }
}
